/*
 * XML Type:  PaymentMailResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PaymentMailResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PaymentMailResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PaymentMailResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.PaymentMailResponse
{
    
    public PaymentMailResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MAIL$0 = 
        new javax.xml.namespace.QName("", "MAIL");
    private static final javax.xml.namespace.QName SRVRTID$2 = 
        new javax.xml.namespace.QName("", "SRVRTID");
    private static final javax.xml.namespace.QName PMTINFO$4 = 
        new javax.xml.namespace.QName("", "PMTINFO");
    
    
    /**
     * Gets the "MAIL" element
     */
    public net.ofx.types.x2003.x04.Mail getMAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().find_element_user(MAIL$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "MAIL" element
     */
    public void setMAIL(net.ofx.types.x2003.x04.Mail mail)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().find_element_user(MAIL$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Mail)get_store().add_element_user(MAIL$0);
            }
            target.set(mail);
        }
    }
    
    /**
     * Appends and returns a new empty "MAIL" element
     */
    public net.ofx.types.x2003.x04.Mail addNewMAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Mail target = null;
            target = (net.ofx.types.x2003.x04.Mail)get_store().add_element_user(MAIL$0);
            return target;
        }
    }
    
    /**
     * Gets the "SRVRTID" element
     */
    public java.lang.String getSRVRTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SRVRTID$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "SRVRTID" element
     */
    public net.ofx.types.x2003.x04.ServerIdType xgetSRVRTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(SRVRTID$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "SRVRTID" element
     */
    public boolean isSetSRVRTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SRVRTID$2) != 0;
        }
    }
    
    /**
     * Sets the "SRVRTID" element
     */
    public void setSRVRTID(java.lang.String srvrtid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SRVRTID$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SRVRTID$2);
            }
            target.setStringValue(srvrtid);
        }
    }
    
    /**
     * Sets (as xml) the "SRVRTID" element
     */
    public void xsetSRVRTID(net.ofx.types.x2003.x04.ServerIdType srvrtid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(SRVRTID$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ServerIdType)get_store().add_element_user(SRVRTID$2);
            }
            target.set(srvrtid);
        }
    }
    
    /**
     * Unsets the "SRVRTID" element
     */
    public void unsetSRVRTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SRVRTID$2, 0);
        }
    }
    
    /**
     * Gets the "PMTINFO" element
     */
    public net.ofx.types.x2003.x04.PaymentInfo getPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().find_element_user(PMTINFO$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTINFO" element
     */
    public boolean isSetPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTINFO$4) != 0;
        }
    }
    
    /**
     * Sets the "PMTINFO" element
     */
    public void setPMTINFO(net.ofx.types.x2003.x04.PaymentInfo pmtinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().find_element_user(PMTINFO$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().add_element_user(PMTINFO$4);
            }
            target.set(pmtinfo);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTINFO" element
     */
    public net.ofx.types.x2003.x04.PaymentInfo addNewPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().add_element_user(PMTINFO$4);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTINFO" element
     */
    public void unsetPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTINFO$4, 0);
        }
    }
}
